//
//  OneViewController.m
//  TNPanNavigationControllerDemo
//
//  Created by CaoXuan on 2017/7/15.
//  Copyright © 2017年 Tenney. All rights reserved.
//

#import "OneViewController.h"
#import "ThreeViewController.h"
#import "TNPanNavigationController.h"

@interface OneViewController ()

@end

@implementation OneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"就是";
    
    self.view.backgroundColor = [UIColor purpleColor];
    
    
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
    btn.backgroundColor = [UIColor orangeColor];
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    TNPanNavigationController *nav =  (TNPanNavigationController *)self.navigationController;
 //   nav.disablePanBack = YES;
    nav.enableNavigationBarTransform = YES;
}

- (void)btnClick
{
    ThreeViewController *three = [[ThreeViewController alloc] init];
    [self.navigationController pushViewController:three animated:YES];
}


- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
  //  [self.navigationController setNavigationBarHidden:YES animated:YES];
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
 //   [self.navigationController setNavigationBarHidden:NO animated:YES];
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    NSLog(@"就是");
}


@end
